/*
 * $Id$
 */
package py.firefly.request;

import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author myang
 */
public interface Request {
    
    /**
     * 
     * @param method
     * @return 
     */
    boolean is(HttpMethod method);

    /**
     * 
     * @return 
     */
    String path();

    /**
     * 
     * @return 
     */
    RequestParameters params();

    /**
     * 
     * @return 
     */
    HttpServletRequest containerRequest();

    /**
     * 
     * @param path
     * @param resp 
     */
    void forward(String path, Response resp);

    /**
     * 
     * @return 
     */
    String uri();

    /**
     * 
     * @param name
     * @return 
     */
    Object attr(String name);

    /**
     * 
     * @param name
     * @param val
     * @return 
     */
    Request attr(String name, Object val);

    /**
     * 
     * @param name
     * @return 
     */
    Object context(String name);
}
